package com.tulele.vtool.qrcode;

/**
 * @version : V1.0
 * @ClassName: QrCodeTest
 * @Description: TODO
 * @Auther: chujiu
 * @Date: 2020/10/30 2:24
 */
public class QrCodeTest {

    public static void main(String[] args) throws Exception {
        // 存放在二维码中的内容
        String text = "我是二维码";
        text = "http://test.qishangjinfu.com/pages/commercialCollege/courseDetails.html?id=1002&userId=1226314";
        // 嵌入二维码的图片路径
        String imgPath = "G:/temp/image/qrCode/v2-1ea1f4b00aac61996d58f7fedcc80058_hd.jpg";
        // 生成的二维码的路径及名称
        String destPath = "G:/temp/image/qrCode/myQrCode.jpg";
        //生成二维码
        QRCodeUtil.encode(text, imgPath, destPath, true);
        // 解析二维码
        String str = QRCodeUtil.decode(destPath);
        // 打印出解析出的内容
        System.out.println(str);

    }
}
